home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_11 / allison / tstr.cpp < prev    next >
C/C++ Source or Header  |  1994-09-13  |  229b  |  19 lines

  1. // tstr.cpp
  2. #include <iostream.h>
  3. #include "str.h"
  4.  
  5. main()
  6. {
  7.     string s("hello"), t = s;
  8.  
  9.     t[0] = 'j';
  10.     cout << "s == " << s << endl;
  11.     cout << "t == " << t << endl;
  12.     return 0;
  13. }
  14.  
  15. /* Output:
  16. s == jello
  17. t == jello
  18. */
  19.